/**
 *autho xf
 * */
function  SubmitWebLogin(){
    var phones      = $("#phone").val();
    var pwd         = $("#pwd").val();
    var webtoken    = $("#webtoken").val();
    var weburl      = $("#weburl").val();
    if (phone == '' || phone == null) {
      alert("手机号码不能为空");
        return false;
    }
    if (!(/^1(3|4|5|7|8)\d{9}$/.test(phones))) {
        alert("请输入正确的手机号码");
        return false;
    }
    if (pwd.length < 6 || pwd.length > 16) {
        alert("请输入6-16位的登录密码");
        return false;
    }
    $.ajax({
        url: 'weblogin.html',
        type: "post",
        data: {phones: phones, pwd: pwd, webtoken: webtoken},
        dataType: "json",
        timeout: 30000,
        success: function (json) {
            if (json.code == 1) {//ok
                window.location.href =weburl;
            }
            if (json.code == 2) {//ok
                alert(json.mess);
            }
            if (json.code == 3) {//ok
                alert(json.mess);
            }
        }
    });

}


